<template>
  <div class="drive-detail">
    <h2 class="title">驾校总业绩</h2>
    <div class="icons">
      <div class="icon-container">
        <img src="@/assets/student.jpg" alt="Icon 1">
        <p>学员人数: {{ students }}</p>
      </div>
      <div class="icon-container">
        <img src="@/assets/coach.jpg" alt="Icon 2">
        <p>教练人数: {{ coaches }}</p>
      </div>
      <div class="icon-container">
        <img src="@/assets/car.jpg" alt="Icon 3">
        <p>车辆数量: {{ cars }}</p>
      </div>
    </div>
    <div class="charts">
      <div class="chart-container">
        <canvas ref="driveChart"></canvas>
      </div>
      <div class="pie-chart-container">
        <canvas ref="incomeExpensePieChart"></canvas>
      </div>
    </div>
  </div>
</template>

<script>
import DriveDetail from "@/components/drive/js/DriveDetail";
export default DriveDetail;
</script>

<style scoped>
.drive-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}
.icons {
  display: flex;
  margin-top: 10px;
}
.icon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 40px;
}
.icons img {
  height: 70px;
  width: 70px;
}
.info {
  margin-top: 20px;
}

.charts {
  display: flex;
  margin-top: 30px;
  justify-content: center;
  align-items: stretch; /* 添加这一行来改变子容器的高度 */
}
.chart-container {
  width: 780px; /* 使用所需的宽度 */
  height: 780px; /* 使用所需的高度 */
  margin-left: 20px;
  margin-right: 10px;
}
.pie-chart-container {
  width: 400px; /* 使用所需的宽度 */
  height: 400px; /* 使用所需的高度 */
  margin-left: 10px;
  margin-right: 20px;
}
</style>